package com.example.bodyinfo.web.Controller;

import com.example.bodyinfo.model.*;
import com.example.bodyinfo.service.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@CrossOrigin
@RestController
public class jsonController {
    @Autowired
    CoordinateService coordinateService;
    @Autowired
    userinfoService userinfoService;
    @Autowired
    workInfoService workInfoService;
    @Autowired
    InfoManagerService infoManagerService;
    @Autowired
    userService userService;
    @RequestMapping("findCoordinate")
    public coordinate findAllcoordinate(){

        return coordinateService.findById(1);
    }
    @RequestMapping("findWorkInfo")
    public workInfo findWorkInfo(){
       workInfo workInfo= workInfoService.findById(1);
        return workInfo;
    }
    @RequestMapping("findUserInfo")
    public userinfo findUserInfo(){
       userinfo user =userinfoService.findById(1);
        return user;
    }
    @RequestMapping("findInfoManager")
    public PageResult findInfoManager(){
        infoManagerService.findById();
        return  infoManagerService.findById();
    }
    @RequestMapping("findUser")
    public user Finduser(){

        return  userService.findById();
    }
}
